package com.zhaohang.cn.zhaohangapp;

import android.widget.FrameLayout;

import com.zhaohang.cn.constant.ConstantUtils;
import com.zhaohang.cn.fragm.MianHomeFragment;


public class MainActivity extends BasicActivity {


    private FrameLayout mianFragmentLayout;

    @Override
    protected int setContentSuccessView() {
        return R.layout.activity_main;
    }

    @Override
    protected int setShowState() {
        return ConstantUtils.RELEATSHOW;
    }

    @Override
    protected int setNoNetView() {
        return 0;
    }

    @Override
    protected void initData() {

    }

    @Override
    protected int setNoDataView() {
        return 0;
    }

    @Override
    public boolean needNetListion() {
        return true;
    }

    @Override
    public void onNetChange(int netMobile) {
        super.onNetChange(netMobile);
        System.out.println("主界面测试网络状态是：" + netMobile);
    }

    @Override
    protected Object setData() {
        return null;
    }

    @Override
    protected void initChildView() {

        setTitleText("首页");
        getSupportFragmentManager()
                .beginTransaction()
                .add(R.id.activity_main, new MianHomeFragment())   // 此处的R.id.fragment_container是要盛放fragment的父容器
                .commit();
    }
}
